#include<iostream>
using namespace std;
int main(){
	int n,y2,y1,y2_shortest=1005,y1_heightest=0;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>y2;
		if(y2<y2_shortest) y2_shortest=y2;
	}
	for(int i=0;i<n;i++){
		cin>>y1;
		if(y1>y1_heightest) y1_heightest=y1;
	}
	if(y2_shortest>y1_heightest)
		cout<<"Yes"<<" "<<y2_shortest-y1_heightest;
	else cout<<"No"<<" "<<y1_heightest-y2_shortest+1;
	return 0;
}
